package snapex.core.mapper.ext;

import org.apache.ibatis.builder.annotation.ProviderMethodResolver;

public class StaffInfoSqlProvider implements ProviderMethodResolver {
	
	public static String getApprover(String teamId, String authority) {
		
		return "select s.* from t_staff_info s, t_user_authority u where s.stf_no = u.uat_user and u.uat_type=#{authority} and s.stf_teamid=#{teamId}";
	}
	
	public static String getParentApprover(String teamId, String authority) {
		
		return "select s.* from t_staff_info s, t_user_authority u where s.stf_no = u.uat_user and u.uat_type=#{authority} and s.stf_teamid in (select ugp_parent from t_user_group g where g.ugp_name=#{teamId}) ";
	}
}
